]> dgit.raspbian.org Git - gnome-shell.git/commit
st/focus-manager: Check for NULL instead of stage to exit loop
authorJonas Dreßler <verdre@v0yd.nl>
Fri, 1 Mar 2024 17:39:18 +0000 (18:39 +0100)
committerRobert Mader <robert.mader@posteo.de>
Thu, 28 Aug 2025 18:23:13 +0000 (18:23 +0000)
commit0df2168b18383452b48d09e0abc7b95be6540d7e
tree36bc5a3b976fa115cec7fe4431bae5f75451151d
parent314137c8c97237753675e8195980c8c56f434499
st/focus-manager: Check for NULL instead of stage to exit loop

In st_focus_manager_stage_event() we get the current key-focus actor from
the stage, and then enter a loop where we iterate through parents until we
get to the stage. If the key-focus actor is not a descendent of the stage
for some reason, this loop will never exit and we've locked up.

We can easily prevent the endless loop by checking for NULL as the exit
condition instead of checking for the stage, so do that instead.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3220>
src/st/st-focus-manager.c